package com.example.demo.zaqizabatest.函数接口;

import java.util.HashMap;
import java.util.Map;
import java.util.function.BiFunction;

/**
 * @ClassName BiFunctionTest BiFunction<T,U,R> 表示接受两个不同类型的参数，并返回一个其它类型的结果的操作
 * @Author lys4134
 * @Date 2021/08/13 14:51:05
 * @Description BiFunctionTest
 * @Version 1.0
 **/
public class BiFunctionTest {
    public static void main(String[] args) {
        eval(AHelp.key, AHelp.value, (a, b) -> {
            Map<String, String> map = new HashMap<>();
            map.put(a, b);
            return map;
        });
    }

    public static void eval(String list, String list2, BiFunction<String, String, Map<String, String>> biFunction) {
        Map<String, String> apply = biFunction.apply(list, list2);
        System.out.println(apply);
    }
}
